home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 March / Disc 2 / APC0403D2.ISO / workshop / gamserv / files / GHSetup.1.5.0004.exe / %MAINDIR% / Quake2.gof < prev    next >
Encoding:
Text File  |  2004-01-15  |  9.8 KB  |  399 lines

  1. // Class definition for quake2.exe
  2.  
  3. class QuakeII
  4. {
  5.     /***************************************************************
  6.     * Begin of required properties for all GOFs.
  7.     * The 'Display' names should never be changed on these variables.
  8.     ***************************************************************/
  9.     [
  10.      Display("Host Name"), 
  11.      Description("The name of the server."),
  12.      Default("Quake II Server"),
  13.      AlwaysBrowserVisible,
  14.     ]
  15.     string hostname;
  16.  
  17.     [
  18.      Display("Current Players"), 
  19.      Description("The current number of players connected to the server."), 
  20.      Readonly,
  21.      AlwaysBrowserVisible
  22.     ]
  23.     uint32 currentclients;
  24.  
  25.     [
  26.      Display("Maximum Players"), 
  27.      Description("The maximum number of players allowed on the server."), 
  28.      Default("8"),
  29.      AfterLevelChange,
  30.      AlwaysBrowserVisible
  31.     ]
  32.     uint32 maxclients;
  33.  
  34.     [
  35.      Display("Port"), 
  36.      Description("The UDP port the server is using."), 
  37.      Readonly,
  38.      Default("27910") // This will be used when inserting a new server.
  39.     ]
  40.     uint32 port;
  41.  
  42.     [
  43.      Display("Game Directory"), 
  44.      Description(
  45.         "The directory used for additional map information.  "
  46.         "This indicates which mod the server is using."), 
  47.      Default("baseq2"),
  48.      AlwaysBrowserVisible,
  49.      AfterLevelChange
  50.     ]
  51.     string game;
  52.  
  53.     [
  54.      Display("Extra Parameters"), 
  55.      Description(
  56.         "This property can be used to pass additional command-line "
  57.         "parameters to the game server."), 
  58.      Default("")
  59.     ]
  60.     string extraparam; // This name should never change.
  61.  
  62.     [
  63.      Display("Initial Level"),
  64.      Description("When the server first starts it will use this level."),
  65.      ValueMap{
  66.         "base1","base2","base3","biggun","boss1",
  67.         "boss2","bunk1","city1","city2",
  68.         "city3","command","cool1","fact1",
  69.         "fact2","fact3","hangar1","hangar2",
  70.         "jail1","jail2","jail3",
  71.         "jail4","jail5","lab","mine1",
  72.         "mine2","mine3","mine4","mintro","power1",
  73.         "power2","security","space","strike","train",
  74.         "ware1","ware2","waste1","waste2",
  75.         "waste3"},
  76.      Values{
  77.         "Outer Base","Installation","Comm Center","Big Gun","Inner Chamber",
  78.         "Final Showdown","Ammo Depot","Outer Courts","Lower Palace",
  79.         "Upper Palace","Launch Command","Cooling Facility","Receiving Center",
  80.         "Processing Plant","Sudden Death","Outer Hangar","Inner Hangar",
  81.         "Main Gate","Detention Center","Security Complex",
  82.         "The Tourture Chambers","Guard House","Research Lab","Upper Mines",
  83.         "Borehole","Drilling Area","Lower Mines","Mine Entrance","Power Plant",
  84.         "The Reactor","Grid Control","Comm Satellite","Outlands","Lost Station",
  85.         "Supply Station","Warehouse","Toxic Waste Dump","Pumping Station 1",
  86.         "Pumping Station 2"},
  87.      Default("Outer Base")
  88.     ]
  89.     string initlevel;
  90.  
  91.     [
  92.      Display("Current Level"),
  93.      Description("The current map the server is using."),
  94.      AlwaysBrowserVisible,
  95.      Readonly,
  96.      UsesValues("initlevel")
  97.     ]
  98.     string mapname;
  99.  
  100.     [
  101.      Display("Time Limit"), 
  102.      Description(
  103.         "The number of minutes the server will remain on a level.  "
  104.         "If this is 0 there is no time limit."),
  105.      AlwaysBrowserVisible,
  106.      Default("0") 
  107.     ]
  108.     uint32 timelimit;
  109.  
  110.     [
  111.      Display("Score Limit"), 
  112.      Description(
  113.         "When a player's score reaches this level, the server will change "
  114.         "to the next map.  If this number is 0 there is no score limit."),
  115.      AlwaysBrowserVisible,
  116.      Default("0") 
  117.     ]
  118.     uint32 fraglimit;
  119.     /***************************************************************
  120.     * End of required properties for all GOFs.
  121.     ***************************************************************/
  122.  
  123.  
  124.     [
  125.      Display("Game DLL Location"), 
  126.      Description(
  127.         "The name of the folder being used by the game server for "
  128.         "custom map information."), 
  129.      Readonly,
  130.     ]
  131.     string gamename;
  132.  
  133.     [
  134.      Display("Game DLL Date"), 
  135.      Description("The date of the game file."), 
  136.      Readonly,
  137.     ]
  138.     string gamedate;
  139.  
  140.     [
  141.      Display("Quake II Version"),
  142.      Description("The version of the Quake II server."), 
  143.      AlwaysBrowserVisible,
  144.      Readonly,
  145.     ]
  146.     string version;
  147.  
  148.     [
  149.      Display("Maximum Spectators"),
  150.      Description("Maximum number of spectators allowed on the server."), 
  151.      Default("4"),
  152.     ]
  153.     uint32 maxspectators;
  154.  
  155.     [
  156.      Display("Quake II Protocol"),
  157.      Description("The Quake II protocol number the server is using."), 
  158.      Readonly,
  159.      AlwaysBrowserVisible,
  160.     ]
  161.     string protocol;
  162.  
  163.     [
  164.      Display("Cheats"), 
  165.      Description("This property enables cheat codes on the server."), 
  166.      AfterLevelChange,
  167.      AlwaysBrowserVisible,
  168.      Default("False"),
  169.     ]
  170.     boolean cheats;
  171.  
  172.     [
  173.      Display("Cooperative Mode"), 
  174.      Description(
  175.         "Enables cooperative play.  When this "
  176.         "property is enabled 'Deathmatch Flags' is ignored."), 
  177.      Default("False"),
  178.      AfterLevelChange,
  179.     ]
  180.     boolean coop;
  181.  
  182.     [
  183.      Display("Deathmatch Mode"), 
  184.      Description("Enables deathmatch mode."), 
  185.      AlwaysBrowserVisible,
  186.      AfterLevelChange,
  187.      Default("True") 
  188.     ]
  189.     boolean deathmatch;
  190.  
  191.     [
  192.      Display("Deathmatch Flags"),
  193.      Description(
  194.         "Determines deatchmatch gameplay options."), 
  195.      Default("Instant Powerups"),
  196.      Values {
  197.         "No Health","No Powerups","Weapons Stay","No Falling Damage",
  198.         "Instant Powerups","Same Map","Teams by Skin","Teams by Model",
  199.         "No Friendly Fire","Spawn Farthest","Force Respawn","No Armor",
  200.         "Allow Exit","Infinite Ammo","Quad Drop","Fixed FOV",
  201.         "CTF Force Join","Armor Protect","CTF No Tech"},
  202.      // 65536 has been skipped.  Otherwise, the ValueMap section wouldn't be
  203.      // needed.
  204.      ValueMap {
  205.         "1", "2", "4", "8",
  206.         "16", "32", "64", "128",
  207.         "256", "512", "1024", "2048",
  208.         "4096", "8192", "16384", "32768",
  209.         "131072", "262144", "524288" },
  210.      AlwaysBrowserVisible,
  211.      Bitmask
  212.     ]
  213.     uint32 dmflags;
  214.  
  215.     [
  216.      Display("Message Mode"),
  217.      Description("Determines which messages are displayed."), 
  218.      Default("Most Messages"),
  219.      Values {
  220.         "All Messages","Most Messages","Limited Messages","Minimal Messages",
  221.         "No Messages"},
  222.     ]
  223.     uint32 msg;
  224.  
  225.     [
  226.      Display("Password"),
  227.      Description(
  228.         "The password required to join the server.  If this is empty no "
  229.         "password is required to join the server."),
  230.      Default(""),
  231.     ]
  232.     string password;
  233.  
  234.     [
  235.      Display("Spectator Password"),
  236.      Description(
  237.         "The password required to join the server as a spectator.  "
  238.         "If this is empty no password is required to join the server as "
  239.         "a spectator."),
  240.      Default(""),
  241.     ]
  242.     string spectator_password;
  243.  
  244.     [
  245.      Display("Air Acceleration"), 
  246.      Description(
  247.         "A non-zero value will allow players to control their velocity "
  248.         "while in the air."), 
  249.      Default("0") 
  250.     ]
  251.     uint32 sv_airaccelerate;
  252.  
  253.     [
  254.      Display("Enforce Time"), 
  255.      Description(
  256.         "Enables the enforcing of time measurements between the client "
  257.         "and server."), 
  258.      Default("False") 
  259.     ]
  260.     boolean sv_enforcetime;
  261.  
  262.     [
  263.      Display("Gravity"),
  264.      Description("The gravity used in the game."), 
  265.      Default("800") 
  266.     ]
  267.     uint32 sv_gravity;
  268.  
  269.     [
  270.      Display("Map List"),
  271.      Description(
  272.         "A list of maps the server uses when automatically "
  273.         "changing to the next level."),
  274.      Array(" "),
  275.      UsesValues("initlevel"),
  276.      Default("") 
  277.     ]
  278.     string sv_maplist;
  279.  
  280.     [
  281.      Display("Maximum Velocity"),
  282.      Description("The maximum velocity for moving objects."), 
  283.      Default("2000") 
  284.     ]
  285.     uint32 sv_maxvelocity;
  286.  
  287.     [
  288.      Display("No Reload"),
  289.      Description(
  290.         "Enables the reloading of all game information when maps are "
  291.         "changed."), 
  292.      Default("False") 
  293.     ]
  294.     boolean sv_noreload;
  295.  
  296.     [
  297.      Display("Reconnect Limit"),
  298.      Description(
  299.         "The number of times that a client can reconnect to the server."),
  300.      Default("3")
  301.     ]
  302.     uint32 sv_reconnect_limit;
  303.  
  304.     [
  305.      Display("Connection Timeout"),
  306.      Description(
  307.         "The maximum number of seconds before terminating a client that "
  308.         "hasn't sent any packets during that time."),
  309.      Default("125")
  310.     ]
  311.     uint32 timeout;
  312.  
  313.     [
  314.      Display("Byte Rate"),
  315.      Description(
  316.         "The maximum number of bytes the server should send a client."),
  317.      Default("2500")
  318.     ]
  319.     uint32 rate;
  320.  
  321.     [
  322.      MethodVar,
  323.      Display("Map Name"),
  324.      Description(""),
  325.      UsesValues("initlevel")
  326.     ]
  327.     string map;
  328.  
  329.     [
  330.      Display("Change Current Level"),
  331.      Description("Changes the current level."),
  332.      ConsoleCommand("map %1")
  333.     ]
  334.     void ChangeLevel(MethodVar map);
  335.  
  336.     [
  337.      MethodVar,
  338.      Display("Make Visible to Browsers"),
  339.      Description(""),
  340.      Values{"True", "False"},
  341.      ValueMap{"s", ""}
  342.     ]
  343.     string varflag;
  344.  
  345.  
  346.     /***************************************************************
  347.     * Begin of required methods for all GOFs.
  348.     * The names of these methods should never be changed.
  349.     ***************************************************************/
  350.     [
  351.      Display("Set Property"),
  352.      Description("Sets a server property."),
  353.      ConsoleCommand("set %1 \"%2\" %3")
  354.     ]
  355.     void SetProperty(string strVar, string strValue, MethodVar varflag);
  356.     /***************************************************************
  357.     * End of required methods for all GOFs.
  358.     ***************************************************************/
  359.     
  360.     
  361.     /***************************************************************
  362.     * Begin of recommended methods for all GOFs.
  363.     * The names of these methods should never be changed.
  364.     ***************************************************************/
  365.     [
  366.      Display("Kick Player from Server"),
  367.      Description("Removes player from server."),
  368.      ConsoleCommand("kick %1")
  369.     ]
  370.     void KickPlayerByNumber(string strID);
  371.     /***************************************************************
  372.     * End of recommended methods for all GOFs.
  373.     ***************************************************************/
  374.     
  375.     
  376.     [
  377.      Display("Execute Config File"),
  378.      Description("Executes a config file of console commands."),
  379.      ConsoleCommand("exec %1")
  380.     ]
  381.     void Exec(string strMasterList);
  382.  
  383.     [
  384.      Display("Set Master Server"),
  385.      Description("Sets the master server for the game server."),
  386.      ConsoleCommand("setmaster %1")
  387.     ]
  388.     void SetMaster(string strMasterList);
  389.  
  390.     [
  391.      Display("Status"),
  392.      Description("Gets the status of the game server."),
  393.      ConsoleCommand("status")
  394.     ]
  395.     void Status();
  396.  
  397. };
  398.     
  399.